package mythink_1;


public class Fan {
	
	final int SLOW = 1;
	final int MEDIO = 2;
	final int FAST = 3;
	private int speed = SLOW; //速度
	private boolean on = false; //状态 开/关
	private double redius = 5; //半径
	private String color = "blue"; //风扇颜色
	
	public int getSpeed() {
		return speed;
	}
	public void setSpeed(int speed) {
		this.speed = speed;
	}
	public boolean isOn() {
		return on;
	}
	public void setOn(boolean on) {
		this.on = on;
	}
	public double getRedius() {
		return redius;
	}
	public void setRedius(double redius) {
		this.redius = redius;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	
	public Fan() {
		super();
	}
	
	public String toString() {
		if(on)
			return "Fan is off [ redius=" + redius + ", color=" + color + "]";
		else
			return "Fan [speed=" + speed + ", redius=" + redius + ", color=" + color + "]";
	}
	

	
	
	
	
	
}
